<%@ page session="false"%><%@ page
	contentType="text/html; charset=utf-8"%><%@ taglib
	uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%><%@ taglib
	uri="http://www.springframework.org/tags" prefix="s"%><%@ taglib
	uri="http://www.springframework.org/tags/form" prefix="form"%>
<div class="body_panel">

	<div class="center form_input_register v_background border_dash_gray ">
		<h3 class="common_h3">
			<s:message code="register.desc.create"></s:message>
		</h3>
		<h3 class="common_h2">
			<span class="red_text">*</span>
			<s:message code="register.desc.must"></s:message>
		</h3>
		<form:form id="registerForm" name="registerForm"
			modelAttribute="person" action="register" cssClass="form ">
			<div class="divTable">
				<div class="divRow">
					<div class="divColumn width_20">
						<form:label path="account" for="account">
							<span class="red_text">*</span>
							<s:message code="register.title.account" />
						</form:label>
						<input type="hidden" id="account_help"
							value="<s:message code='register.title.account.help'/>">
					</div>
					<div class="divColumn width_20">
						<form:input path="account" id="account" onfocus="inputTips(this)"
							onblur="hideInputTips(this)" />
					</div>
					<div class="divColumn width_60">
						<form:errors path="account" cssClass="red_text"></form:errors>
					</div>
				</div>
				<div class="divRow">
					<div class="divColumn width_20">
						<form:label path="email" for="email">
							<span class="red_text">*</span>
							<s:message code="register.title.email" />
						</form:label>
						<input type="hidden" id="email_help"
							value="<s:message code='register.title.email.help'/>">
					</div>
					<div class="divColumn width_20">
						<form:input path="email" id="email" onfocus="inputTips(this)"
							onblur="hideInputTips(this)" />
					</div>
					<div class="divColumn width_60">
						<form:errors path="email" cssClass="red_text"></form:errors>
					</div>
				</div>
				<div class="divRow">
					<div class="divColumn width_20">
						<form:label path="nickName" for="nickName">
							<span class="red_text">*</span>
							<s:message code="register.title.nickName" />
						</form:label>
						<input type="hidden" id="nickName_help"
							value="<s:message code='register.title.nickName.help'/>">
					</div>
					<div class="divColumn width_20">
						<form:input path="nickName" id="nickName"
							onfocus="inputTips(this)" onblur="hideInputTips(this)" />
					</div>
					<div class="divColumn width_60">
						<form:errors path="nickName" cssClass="red_text"></form:errors>
					</div>
				</div>
				<div class="divRow">
					<div class="divColumn width_20">
						<form:label path="password" for="password">
							<span class="red_text">*</span>
							<s:message code="register.title.password" />
						</form:label>
						<input type="hidden" id="password_help"
							value="<s:message code='register.title.password.help'/>">
					</div>
					<div class="divColumn width_20">
						<form:password path="password" id="password"
							onfocus="inputTips(this)" onblur="hideInputTips(this)" />
					</div>
					<div class="divColumn width_60">
						<form:errors path="password" cssClass="red_text"></form:errors>
					</div>
				</div>
				<div class="divRow">
					<div class="divColumn width_20">
						<form:label path="retypePassword" for="retypePassword">
							<span class="red_text">*</span>
							<s:message code="register.title.retypePassword" />
						</form:label>
					</div>
					<div class="divColumn width_20">
						<form:password path="retypePassword" id="retypePassword" />
					</div>
					<div class="divColumn width_60">
						<form:errors path="retypePassword" cssClass="red_text"></form:errors>
					</div>
				</div>
			</div>
			<div class="common_line_blue"></div>
			<div class="divTable">
				<div class="divRow">
					<div class="divColumn width_20">
						<form:label path="birthday" for="birthday">
							<span class="red_text">*</span>
							<s:message code="register.title.birthday" />
						</form:label>
						<input type="hidden" id="birthday_help"
							value="<s:message code='register.title.birthday.help'/>">
					</div>
					<div class="divColumn width_20">
						<form:input path="birthday" id="birthday"
							onfocus="inputTips(this)" onblur="hideInputTips(this)" />
					</div>
					<div class="divColumn width_60">
						<form:errors path="birthday" cssClass="red_text"></form:errors>
					</div>
				</div>
				<div class="divRow">
					<div class="divColumn width_20">
						<form:label path="verification" for="verification">
							<span class="red_text">*</span>
							<s:message code="register.title.verification" />
						</form:label>
					</div>
					<div class="divColumn width_20">
						<form:input path="verification" id="verification" maxlength="4" />
					</div>
					<div class="divColumn width_60">
						<a onclick="reloadVCode();" class="inline_block margin_left_15px"><img
							id="verificationCode" title="若看不清请点击获取新验证码"
							src="<c:url value='/common/generateCode/r'/>"></a>
						<form:errors path="verification" cssClass="red_text"></form:errors>
					</div>
				</div>
				<div class="divRow">
					<div class="divColumn">
						<a href="javascript:document.registerForm.submit();"
							class="button green glossy" data-icon="☑"><s:message
								code="register.button.create" /></a>
					</div>
				</div>
			</div>
		</form:form>
	</div>
	<div id="tvset">
		<div id="tvset_text"></div>
	</div>
</div>
<script type="text/javascript">
function reloadVCode() {
	var vCode = $("#verificationCode");
	var src = vCode.attr("src");
	vCode.attr("src", src);
}
function inputTips(src) {
	var positionTop = src.offsetTop -110;
	var positionLeft = src.offsetLeft;
	var width = src.offsetWidth + 25;
	var tvset = $("#tvset");
	var tvsetText = $("#tvset_text");
	var id_help = src.id + "_help"
	tvsetText.text($("#" + id_help).val());
	tvset.css({'top':positionTop,"left":positionLeft + width});
	tvset.show();
}
function hideInputTips(src) {
	$("#tvset").hide();
}

</script>
